Qt Creator build시 install도 함께

in qtcreator •  6 years ago  (edited)

간단한 작업이었는데 고민은 무척 많이 한 것 같다. 라이브러리를 생성하는 프로젝트를 하나 만들었는데, 결과 파일을 특정 위치로 설치하도록 하고 싶었다. 다른 프로젝트에서 그 위치에 있는 라이브러리를 참조하도록 만들었기 때문이다. 설치 위치를 조정하는 방법은 간단하다. pro 파일에서 INSTALLS 값을 조정해주는 방법이다.

target.path = ../lib
INSTALLS += target

문제는 build를 하더라도 자동으로 이 위치로 결과 파일이 설치되지 않는다는 것이다. 수작업으로는 build_xxx 디렉토리에서 "make install" 을 실행시켜주면 된다는 것은 파악하고 있는 상황이었다.
결국 해결한 방법은 Qt Creator의 Projects 탭을 선택하여 Build Settings의 내용을 추가로 설정해주는 것이다. 즉, Build Steps 버튼을 클릭하면 드랍박스가 나타나는데, Make 를 선택하고, Make arguments에서 install을 입력한다.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Congratulations @moonyl! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Do not miss the last post from @steemitboard:

SteemitBoard Ranking update - A better rich list comparator
Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Congratulations @moonyl! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 1 year!

Click here to view your Board

Support SteemitBoard's project! Vote for its witness and get one more award!